tg-me.com/r_riscv/3430
Last Update:
Help: GDB Remote Debugging with Spike + pk Timing Out on Port 1234 (RV32IMAC)
Hi all,
I'm working with a RISC-V toolchain targeting rv32imac
and trying to debug a simple hello.elf
program using spike
and gdb
, but I'm stuck with a timeout issue when GDB tries to connect.
Here's what I have:
Toolchain: `riscv32-unknown-elf-gcc` (newlib)
hello.elf
is compiled for RV32IMAC and runs fine with Spike + pk.
`pk` is 32-bit and works correctly.
GDB loads hello.elf
correctly.
spike --isa=RV32IMAC /path/to/pk /path/to/hello.elf
This prints the expected output (e.g., “Hello, RISC-V!”).
When I try to launch Spike for remote debugging:
spike --isa=RV32IMAC --rbb-port=1234 /path/to/pk /path/to/hello.elf
It prints:
Listening for remote bitbang connection on port 1234.
Then in another terminal, I run GDB:
riscv32-unknown-elf-gdb /path/to/hello.elf
(gdb) target remote localhost:1234
But I get:
Could not connect: Connection timed out.
I’ve verified the ELF and pk binaries are 32-bit and compatible.
The firewall is disabled, and I'm on a local VM running Ubuntu.
Spike version is 1.1.1-dev (built from source).
# My Questions:
Is --rbb-port
expected to work out-of-the-box with rv32imac
?
Is there a minimum Spike or pk version required for remote GDB debugging?
Could this be an issue with how Spike is configured or built?
Any suggestions, debugging tips, or example working setups would be much appreciated!
Thanks in advance
https://redd.it/1l9viom
@r_riscv
BY RISC-V Reddit

Share with your friend now:
tg-me.com/r_riscv/3430